:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --error-color: #e74c3c;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 200px;
  background: var(--primary-color);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

.sidebar ul li {
  width: 85%;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}

.sidebar ul li:hover, .sidebar ul li.active {
  background: var(--secondary-color);
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.config-panel {
  margin: 20px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  background: #fff;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.param-row {
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.param-row label {
  width: 100px;
  font-weight: 500;
  color: var(--primary-color);
}

.param-row select, .param-row input[type="number"], .param-row input[type="text"] {
  flex: 1;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 150px;
}

#output {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  max-height: 400px;
  overflow-y: auto;
  font-family: monospace;
}

.log-entry {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.error {
  color: var(--error-color);
  font-weight: bold;
}

button {
  padding: 8px 20px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #2980b9;
}

.loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 8px;
  font-size: 18px;
  z-index: 1000;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.config-entry {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
}

.config-name {
  font-size: 1.2em;
  cursor: pointer;
}

.config-details {
  font-size: 0.9em;
  margin-left: 20px;
}

.config-details-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
}

.config-details-row p {
  margin: 0;
  flex: 1;
}

.config-json {
  display: none;
  font-size: 0.8em;
  background-color: #f9f9f9;
  padding: 10px;
  border: 1px solid #ddd;
  margin-top: 10px;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}